﻿// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "SmartCore.generated.h"


UCLASS(Blueprintable)
class USmartCore : public UObject
{
	GENERATED_BODY()
public:
	// FString.ParseIntoArray
	static void StringSplit(FString& SrcStr, const FString& SplitTag, TArray<FString>& Result)
	{
		if (SrcStr.Contains(SplitTag))
		{
			FString LeftStr;
			FString RightStr;
			SrcStr.Split(SplitTag, &LeftStr, &RightStr);
			
			if (!Result.Contains(LeftStr))
			{
				Result.Add(LeftStr);
			}
			StringSplit(RightStr, SplitTag, Result);
		}
		else
		{
			if (!Result.Contains(*SrcStr))
			{
				Result.Add(*SrcStr);
			}
		}
	}

	static void UserScript();
};
